﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
	xmlns:xx="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"
	xmlns:sys="clr-namespace:System;assembly=mscorlib"
	>

	<!--TabControl Left Bottom Syle-->
	<Style x:Key="SwitchLeftBottomStyle" TargetType="sdk:TabControl">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:TabControl">
					<Grid>
						<Grid x:Name="TemplateLeft">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="Auto"/>
								<ColumnDefinition Width="1*"/>
							</Grid.ColumnDefinitions>
							<xx:TabPanel x:Name="TabPanelLeft" Canvas.ZIndex="1" VerticalAlignment="Bottom" Margin="0,0,0,200" />
							<ContentPresenter x:Name="ContentLeft" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Cursor="{TemplateBinding Cursor}" />
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="SwitchTabItemLeftTemplate" TargetType="sdk:TabItem">
		<Setter Property="IsTabStop" Value="False" />
		<Setter Property="Background" Value="Transparent" />
		<Setter Property="BorderBrush" Value="Transparent" />
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="Foreground" Value="#FFB4B4B4"/>
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="Padding" Value="6" />
		<Setter Property="Width" Value="40" />
		<Setter Property="Height" Value="50" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:TabItem">
					<Grid x:Name="Root">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="0:0:0.1"/>
									<VisualTransition To="MouseOver" GeneratedDuration="0:0:0.3"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<DoubleAnimation
                                            Storyboard.TargetName="TabLeftUnSelected" 
                                            Storyboard.TargetProperty="Opacity" 
											                      From="0.25"
                                            To="1"
                                            Duration="0:0:0.3"/>
									</Storyboard>								
								</VisualState>
								<VisualState x:Name="Disabled"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="SelectionStates">
								<VisualState x:Name="Unselected" />
								<VisualState x:Name="Selected" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>			
						
						<!-- TabStripPlacement Left | Selected -->
						<Grid x:Name="TemplateLeftSelected" Visibility="Collapsed" Canvas.ZIndex="1">
							<Border x:Name="TabLeftSelected" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="0,2" Opacity="1">
									<Grid>
									<Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Left"/>
									<Line X1="0" X2="4000" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" VerticalAlignment="Top"/>
									<Line X1="0" X2="4000" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" VerticalAlignment="Bottom"/>
									<ContentControl x:Name="HeaderLeftSelected" IsTabStop="False" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" Cursor="{TemplateBinding Cursor}" />
									</Grid>
							</Border>
						</Grid>

						<!-- TabStripPlacement Left | Unselected -->
						<Grid x:Name="TemplateLeftUnselected" Visibility="Collapsed">
							<Border x:Name="TabLeftUnSelected" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="0,2" Opacity="0.3">
								<Grid>
									<Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Left"/>
									<Line X1="0" X2="4000" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" VerticalAlignment="Top"/>
									<Line X1="0" X2="4000" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" VerticalAlignment="Bottom"/>
									<ContentControl x:Name="HeaderLeftUnselected" IsTabStop="False" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" Cursor="{TemplateBinding Cursor}" />
								</Grid>						
							</Border>
						</Grid>
								
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--TabControl Top Left Style-->
	<Style x:Key="SwitchTopLeftStyle" TargetType="sdk:TabControl">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:TabControl">
					<Grid>
						<Grid x:Name="TemplateTop">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto" />
								<RowDefinition Height="*" />
							</Grid.RowDefinitions>
							<xx:TabPanel x:Name="TabPanelTop" Canvas.ZIndex="1"  VerticalAlignment="Top" Margin="15,0,0,0" />
							<ContentPresenter x:Name="ContentTop" Grid.Row="1"  HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Cursor="{TemplateBinding Cursor}" />
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="SwitchTabItemTopTemplate" TargetType="sdk:TabItem">
		<Setter Property="IsTabStop" Value="False" />
		<Setter Property="Background" Value="Transparent" />
		<Setter Property="BorderBrush" Value="Transparent" />
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="Foreground" Value="#FFB4B4B4"/>
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="Padding" Value="6" />
		<Setter Property="Width" Value="50" />
		<Setter Property="Height" Value="25" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:TabItem">
					<Grid x:Name="Root">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="0:0:0.1"/>
									<VisualTransition To="MouseOver" GeneratedDuration="0:0:0.3"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<DoubleAnimation
                                            Storyboard.TargetName="TabTopUnSelected" 
                                            Storyboard.TargetProperty="Opacity" 
											                      From="0.25"
                                            To="1"
                                            Duration="0:0:0.3"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="SelectionStates">
								<VisualState x:Name="Unselected" />
								<VisualState x:Name="Selected" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>


						<!-- TabStripPlacement Top | Selected -->
						<Grid x:Name="TemplateTopSelected" Visibility="Collapsed" Canvas.ZIndex="1">
							<Border x:Name="TabTopSelected" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="2,0" Opacity="1">
								<Grid>
									<Line X1="0" X2="4000" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" VerticalAlignment="Top"/>
									<Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Left"/>
									<Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Right"/>
									<ContentControl x:Name="HeaderTopSelected" IsTabStop="False" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" Cursor="{TemplateBinding Cursor}" />
								</Grid>
							</Border>
						</Grid>

						<!-- TabStripPlacement Top | Unselected -->
						<Grid x:Name="TemplateTopUnselected" Visibility="Collapsed">
							<Border x:Name="TabTopUnSelected" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="2,0" Opacity="0.3">
								<Grid>
									<Line X1="0" X2="4000" Y1="0" Y2="0" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" VerticalAlignment="Top"/>
									<Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Left"/>
									<Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Right"/>
									<ContentControl x:Name="HeaderTopUnselected" IsTabStop="False" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" Cursor="{TemplateBinding Cursor}" />
								</Grid>
							</Border>
						</Grid>
						
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<!--Input TextBox-->
	<Style x:Key="InputTBoxStyle" TargetType="TextBox">
		<Setter Property="Background" Value="White"/>
		<Setter Property="Foreground" Value="#FF676767"/>
		<Setter Property="BorderBrush" Value="#FFB4B4B4"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="TextWrapping" Value="NoWrap"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="TextBox">
					<Grid x:Name="RootElement">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimation Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" To="#FF52D8FF" Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="ReadOnly">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="ReadOnlyVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="Valid"/>
								<VisualState x:Name="InvalidUnfocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="InvalidFocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsOpen">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<sys:Boolean>True</sys:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" Opacity="1" Background="{TemplateBinding Background}">
							<Grid>
								<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="8,2"/>
								<Border x:Name="ReadOnlyVisualElement" Opacity="0" Background="#5EA6EBFF"/>
								<Border BorderThickness="0" BorderBrush="Transparent">
									<Grid>
									<Rectangle x:Name="MouseOverBorder" Stroke="Transparent" StrokeDashArray="8,2"/>
										<ScrollViewer x:Name="ContentElement" Padding="{TemplateBinding Padding}" BorderThickness="0" IsTabStop="False"/>
									</Grid>
								</Border>
							</Grid>
						</Border>
						<Border x:Name="DisabledVisualElement" Background="#A5F7F7F7" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" IsHitTestVisible="False"/>
						<Border x:Name="FocusVisualElement"  Margin="1" Opacity="0" IsHitTestVisible="False">
							<Rectangle Stroke="#FF52D8FF" StrokeDashArray="8,2"/>
						</Border>
						<Border x:Name="ValidationErrorElement" BorderThickness="1" CornerRadius="1" BorderBrush="Transparent" Visibility="Collapsed">
								<ToolTipService.ToolTip>
									<ToolTip x:Name="validationTooltip" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" 
                         PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                         DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
										<ToolTip.Triggers>
											<EventTrigger RoutedEvent="Canvas.Loaded">
												<EventTrigger.Actions>
													<BeginStoryboard>
														<Storyboard>
															<ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
																<DiscreteObjectKeyFrame KeyTime="0">
																	<DiscreteObjectKeyFrame.Value>
																		<sys:Boolean>true</sys:Boolean>
																	</DiscreteObjectKeyFrame.Value>
																</DiscreteObjectKeyFrame>
															</ObjectAnimationUsingKeyFrames>
														</Storyboard>
													</BeginStoryboard>
												</EventTrigger.Actions>
											</EventTrigger>
										</ToolTip.Triggers>
									</ToolTip>
								</ToolTipService.ToolTip>
							<Grid>
								<Rectangle Stroke="#FFDC000C" StrokeDashArray="8,2"/>
							<Grid Width="12" Height="12" HorizontalAlignment="Right" Margin="1,-4,-4,0" VerticalAlignment="Top" Background="Transparent">
								<Path Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C"/>
								<Path Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff"/>
							</Grid>
							</Grid>
						</Border>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<ControlTemplate x:Key="ValidationToolTipTemplate">
		<Grid x:Name="Root" Margin="5,0" RenderTransformOrigin="0,0" Opacity="0">
			<Grid.RenderTransform>
				<TranslateTransform x:Name="xform" X="-25"/>
			</Grid.RenderTransform>
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="OpenStates">
					<VisualStateGroup.Transitions>
						<VisualTransition GeneratedDuration="0"/>
						<VisualTransition To="Open" GeneratedDuration="0:0:0.2">
							<Storyboard>
								<DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2">
									<DoubleAnimation.EasingFunction>
										<BackEase Amplitude=".3" EasingMode="EaseOut"/>
									</DoubleAnimation.EasingFunction>
								</DoubleAnimation>
								<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"/>
							</Storyboard>
						</VisualTransition>
					</VisualStateGroup.Transitions>
					<VisualState x:Name="Closed">
						<Storyboard>
							<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Open">
						<Storyboard>
							<DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0"/>
							<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			<Border Margin="4,4,-4,-4" Background="#052A2E31" CornerRadius="5"/>
			<Border Margin="3,3,-3,-3" Background="#152A2E31" CornerRadius="4"/>
			<Border Margin="2,2,-2,-2" Background="#252A2E31" CornerRadius="3"/>
			<Border Margin="1,1,-1,-1" Background="#352A2E31" CornerRadius="2"/>
			<Border Background="#FFDC000C" CornerRadius="2"/>
			<Border CornerRadius="2">
				<TextBlock 
                  UseLayoutRounding="false" 
                  Foreground="White" Margin="8,4,8,4" MaxWidth="250" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}"/>
			</Border>
		</Grid>
	</ControlTemplate>
	<!--PasswordBox-->
	<Style x:Key="InputPwbStyle" TargetType="PasswordBox">
		<Setter Property="Background" Value="#FFFAFFBD"/>
		<Setter Property="Foreground" Value="#FF666666"/>
		<Setter Property="FontSize" Value="12"/>
		<Setter Property="FontFamily" Value="Arial"/>
		<Setter Property="FontFamily" Value="Microsoft YaHei"/>
		<Setter Property="BorderBrush" Value="#FFCCCCCC"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Padding" Value="2" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="PasswordBox">
					<Grid x:Name="RootElement">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimation Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" To="#FF52D8FF" Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="ReadOnly">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="ReadOnlyVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="Valid"/>
								<VisualState x:Name="InvalidUnfocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="InvalidFocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsOpen">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<sys:Boolean>True</sys:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Opacity="1" Background="{TemplateBinding Background}">
							<Grid>
								<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="8,2"/>
								<Border BorderThickness="0" BorderBrush="Transparent">
									<Grid>
										<Rectangle x:Name="MouseOverBorder" Stroke="Transparent" StrokeDashArray="8,2"/>
											<Border x:Name="ContentElement" Margin="{TemplateBinding Padding}"/>
									</Grid>
								</Border>
							</Grid>
						</Border>
						<Border x:Name="DisabledVisualElement" Background="#A5F7F7F7" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" IsHitTestVisible="False"/>
						<Border x:Name="FocusVisualElement"  Margin="1" Opacity="0" IsHitTestVisible="False">
							<Rectangle Stroke="#FF52D8FF" StrokeDashArray="8,2"/>
						</Border>
						<Border x:Name="ValidationErrorElement" BorderThickness="1" CornerRadius="1" BorderBrush="Transparent" Visibility="Collapsed">
							<ToolTipService.ToolTip>
								<ToolTip x:Name="validationTooltip" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" 
                         PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                         DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
									<ToolTip.Triggers>
										<EventTrigger RoutedEvent="Canvas.Loaded">
											<EventTrigger.Actions>
												<BeginStoryboard>
													<Storyboard>
														<ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
															<DiscreteObjectKeyFrame KeyTime="0">
																<DiscreteObjectKeyFrame.Value>
																	<sys:Boolean>true</sys:Boolean>
																</DiscreteObjectKeyFrame.Value>
															</DiscreteObjectKeyFrame>
														</ObjectAnimationUsingKeyFrames>
													</Storyboard>
												</BeginStoryboard>
											</EventTrigger.Actions>
										</EventTrigger>
									</ToolTip.Triggers>
								</ToolTip>
							</ToolTipService.ToolTip>
							<Grid>
								<Rectangle Stroke="#FFDC000C" StrokeDashArray="8,2"/>
							<Grid Width="12" Height="12" HorizontalAlignment="Right" Margin="1,-4,-4,0" VerticalAlignment="Top" Background="Transparent">
								<Path Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C"/>
								<Path Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff"/>
							</Grid>
							</Grid>
						</Border>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--Register Page DescriptionViewer-->
	<Style x:Key="RegisterDescriptionViewerStyle" TargetType="sdk:DescriptionViewer">
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="HorizontalAlignment" Value="Center"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="Visibility" Value="Visible"/>
		<Setter Property="Margin" Value="10,0,0,0"/>
		<Setter Property="GlyphTemplate">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid Width="15" Height="15">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid x:Name="Icon" Opacity="0.6" Width="13" Height="13" HorizontalAlignment="Center" VerticalAlignment="Center">
							<Ellipse>
								<Ellipse.Stroke>
									<LinearGradientBrush EndPoint="0.298,0.3" StartPoint="0.505,0.65">
										<GradientStop Color="#FF485E6F"/>
										<GradientStop Color="#4C485E6F" Offset="1"/>
									</LinearGradientBrush>
								</Ellipse.Stroke>
								<Ellipse.Fill>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFCED4D9" Offset="1"/>
										<GradientStop Color="#FFFDFDFD" Offset="0"/>
									</LinearGradientBrush>
								</Ellipse.Fill>
							</Ellipse>
							<StackPanel Height="Auto" Width="3" HorizontalAlignment="Center" VerticalAlignment="Center">
								<Path Height="9" HorizontalAlignment="Center" Margin="0,0,0,1" VerticalAlignment="Top" Width="3" Data="M0.5,0.60000002 C0.5,0.54477155 0.54477155,0.5 0.60000002,0.5 L2.4000001,0.5 C2.4552286,0.5 2.5,0.54477155 2.5,0.60000002 L2.5,1.6215254 C2.5,1.6767539 2.4552286,1.7215254 2.4000001,1.7215254 L0.60000002,1.7215254 C0.54477155,1.7215254 0.5,1.6767539 0.5,1.6215254 z M0.50000548,3.3151906 C0.50000548,3.2599623 0.54477704,3.2151906 0.60000551,3.2151906 L2.4000056,3.2151906 C2.4552341,3.2151906 2.5000055,3.2599623 2.5000055,3.3151906 L2.5000055,8.4000092 C2.5000055,8.4552374 2.4552341,8.5000095 2.4000056,8.5000095 L0.60000551,8.5000095 C0.54477704,8.5000095 0.50000548,8.4552374 0.50000548,8.4000092 z" Stretch="Fill" Stroke="#00000000">
									<Path.Fill>
										<LinearGradientBrush EndPoint="0.39,0.297" StartPoint="0.413,0.653">
											<GradientStop Color="#FF485E6F"/>
											<GradientStop Color="#4C485E6F" Offset="0.781"/>
											<GradientStop Color="#FF485E6F" Offset="0.982"/>
										</LinearGradientBrush>
									</Path.Fill>
								</Path>
							</StackPanel>
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ToolTipStyle">
			<Setter.Value>
				<Style TargetType="ToolTip">
					<Setter Property="Placement" Value="Right"/>
					<Setter Property="IsHitTestVisible" Value="True"/>
					<Setter Property="MaxWidth" Value="250"/>
					<Setter Property="Margin" Value="5,-3,5,0"/>
					<Setter Property="Foreground" Value="White"/>
					<Setter Property="FontSize" Value="12"/>
					<Setter Property="FontFamily" Value="Arial"/>
					<Setter Property="FontFamily" Value="Microsoft YaHei"/>
					<Setter Property="FontWeight" Value="Bold"/>
					<Setter Property="Background" Value="Black"/>
					<Setter Property="BorderBrush" Value="#4CFFA300"/>
					<Setter Property="BorderThickness" Value="0"/>
					<Setter Property="Padding" Value="2"/>
					<Setter Property="Opacity" Value="0.6"/>
					<Setter Property="ContentTemplate">
						<Setter.Value>
							<DataTemplate>
								<TextBlock TextWrapping="Wrap" Text="{Binding}" />
							</DataTemplate>
						</Setter.Value>
					</Setter>
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:DescriptionViewer">
					<StackPanel Orientation="Horizontal">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="DescriptionStates">
								<VisualState x:Name="NoDescription"/>
								<VisualState x:Name="HasDescription">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DescriptionContent" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border Background="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
							<Button x:Name="DescriptionContent" Visibility="Collapsed" IsTabStop="False" Template="{TemplateBinding GlyphTemplate}" Background="#00000000" BorderBrush="#FFFFFFFF" BorderThickness="1" Padding="1"  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
								<ToolTipService.ToolTip>
									<ToolTip Style="{TemplateBinding ToolTipStyle}" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Content="{TemplateBinding Description}"/>
								</ToolTipService.ToolTip>
							</Button>
						</Border>
					</StackPanel>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--WebPage FarmeControl TCC-->
	<Style x:Key="IndexFrameTCCTemplate" TargetType="toolkit:TransitioningContentControl">
		<Setter Property="IsTabStop" Value="True" />
		<Setter Property="HorizontalAlignment" Value="Stretch"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="Transition" Value="DefaultTransition" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="toolkit:TransitioningContentControl">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="PresentationStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="DefaultTransition">
									<Storyboard>
										<DoubleAnimation 
                                            Storyboard.TargetName="PreviousContentPresentationSite" 
                                            Storyboard.TargetProperty="Opacity" 
                                            From="1" 
                                            To="0"
                                            Duration="0:0:0.8"/>
										<DoubleAnimation 
                                            Storyboard.TargetName="CurrentContentPresentationSite"
                                            Storyboard.TargetProperty="Opacity"
                                            From="0" 
                                            To="1"
                                            Duration="0:0:1"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<ContentPresenter x:Name="PreviousContentPresentationSite"
                                          Content="{x:Null}" 
                                          ContentTemplate="{TemplateBinding ContentTemplate}"/>
						<ContentPresenter x:Name="CurrentContentPresentationSite"
                                          Content="{x:Null}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--WebPage FrameControl-->
	<Style x:Key="IndexFrameTemplate" TargetType="sdk:Frame">
		<Setter Property="Background" Value="{x:Null}"/>
		<Setter Property="BorderBrush" Value="{x:Null}"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="Padding" Value="10,0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:Frame">
					<Grid>
						<toolkit:TransitioningContentControl 
                            Style="{StaticResource ResourceKey=IndexFrameTCCTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}" 
                            VerticalAlignment="{TemplateBinding VerticalAlignment}" 
                            Content="{TemplateBinding Content}"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>
